<?
    $this->master('html');

	$this->start('head'); 
	
	// styleshets
	$this->cssInc('res/ext/resources/css/ext-all.css');
	$this->cssInc('res/app/css/desktop.css');
	$this->cssInc('res/app/css/app.css');
	$this->cssInc('res/app/css/icons.css');
	
	// scripts
	$this->jsInc('res/plupload/plupload.full.js');
	$this->jsInc('res/ext/ext-all-debug-w-comments.js');
	$this->jsInc('res/ext/locale/ext-lang-ru.js');
	$this->jsInc('api.php');
	$this->jsInc('res/app/js/init.js');
	$this->jsInc('res/app/js/locales/ru.js');
?>
<script type="text/javascript">
	CA.ROOT_PATH = '<?=App::get('root');?>';

	Ext.Loader.setConfig({
		enabled: true
	});
	
	Ext.Loader.setPath({
		'Ext.ux': '<?=$this->url('res/ext/ux');?>',
		'CA': '<?=$this->url('res/app/js');?>'
	});

	Ext.require(['CA.App']);

	Ext.onReady(function () {
		CA.app = new CA.App();

		Ext.direct.Manager.addProvider(Ext.app.DirectAPI);
	});
</script>
<?	
	$this->end();
?>
